﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x02000006 RID: 6
public class BodyScript : MonoBehaviour
{
	// Token: 0x06000011 RID: 17 RVA: 0x0000354C File Offset: 0x0000174C
	private void Start()
	{
		this.fallAngle = 0f;
		this.limbCols = new List<Collider2D>();
		foreach (Rigidbody2D rigidbody2D in this.limbs)
		{
			this.limbCols.Add(rigidbody2D.GetComponent<Collider2D>());
			SpriteMask spriteMask = rigidbody2D.gameObject.AddComponent<SpriteMask>();
			spriteMask.alphaCutoff = 0.2f;
			spriteMask.sprite = rigidbody2D.GetComponent<SpriteRenderer>().sprite;
			rigidbody2D.gameObject.tag = "Grunt";
		}
		foreach (Collider2D collider2D in this.limbCols)
		{
			foreach (Collider2D collider2D2 in this.limbCols)
			{
				if (collider2D != collider2D2)
				{
					Physics2D.IgnoreCollision(collider2D, collider2D2, true);
				}
			}
		}
		foreach (Rigidbody2D rigidbody2D2 in this.feet)
		{
			this.feetJoints.Add(rigidbody2D2.GetComponent<HingeJoint2D>());
			this.origFeetAnchors.Add(rigidbody2D2.GetComponent<HingeJoint2D>().connectedAnchor);
		}
		foreach (Rigidbody2D rigidbody2D3 in this.hands)
		{
			this.handJoints.Add(rigidbody2D3.GetComponent<SpringJoint2D>());
		}
		this.headSprite = this.head.GetComponent<SpriteRenderer>();
		this.torsoSprite = this.torso.GetComponent<SpriteRenderer>();
		this.maxHealth = this.health;
		this.origOverallForce = this.overallForce;
		this.voice = base.GetComponent<VoiceScript>();
		GameObject gameObject = new GameObject("DizzyIcon", new Type[]
		{
			typeof(SpriteRenderer)
		});
		gameObject.transform.SetParent(base.transform);
		this.dizzyIcon = gameObject.GetComponent<SpriteRenderer>();
		this.dizzyIcon.sprite = Resources.Load<Sprite>("dizzyIcon");
		this.dizzyIcon.color = new Color(this.dizzyIconColor.r, this.dizzyIconColor.g, this.dizzyIconColor.b, 0.35f);
		gameObject.transform.position = this.head.transform.position;
		this.headJoint = this.head.GetComponent<HingeJoint2D>();
	}

	// Token: 0x06000012 RID: 18 RVA: 0x00003830 File Offset: 0x00001A30
	public Vector2 lookPointerRelativePos(Vector2 pos)
	{
		return this.lookPointer.position + this.lookPointer.up * pos.y * this.animPositionMult + this.lookPointer.right * pos.x * this.animPositionMult * this.lookDir;
	}

	// Token: 0x06000013 RID: 19 RVA: 0x000038A4 File Offset: 0x00001AA4
	public float lookPointerRelativeRot(float rot, float offset)
	{
		return offset + rot * this.lookDir;
	}

	// Token: 0x06000014 RID: 20 RVA: 0x000038B0 File Offset: 0x00001AB0
	private void FixedUpdate()
	{
		this.grounded = false;
		foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(this.torso.transform.position + Vector3.down * this.groundCheckOffset, this.groundCheckSize, LayerMask.GetMask(new string[]
		{
			"Default",
			"Grunt"
		})))
		{
			if (!this.limbCols.Contains(collider2D) && (!this.held || this.held.transform != collider2D.transform))
			{
				this.grounded = true;
				break;
			}
		}
		if (this.alive && this.knockOutTime < 0f)
		{
			if (this.fallTime < 0f)
			{
				if (this.grounded)
				{
					if (!this.isBlocking)
					{
						if (!this.isAttacking)
						{
							this.torso.MoveRotation(Mathf.LerpAngle(this.torso.rotation, this.normalAngle * this.lookDir, this.overallForce * Time.fixedDeltaTime));
						}
						else if (this.windupTime > 0f)
						{
							this.torso.MoveRotation(Mathf.LerpAngle(this.torso.rotation, this.unarmedWindupAngle * this.lookDir, this.overallForce * Time.fixedDeltaTime));
						}
						else
						{
							this.torso.MoveRotation(Mathf.LerpAngle(this.torso.rotation, this.unarmedAttackAngle * this.lookDir, this.overallForce * Time.fixedDeltaTime));
						}
					}
					else
					{
						this.torso.MoveRotation(Mathf.LerpAngle(this.torso.rotation, this.blockAngle * this.lookDir, this.overallForce * Time.fixedDeltaTime));
					}
					if (Mathf.Abs(this.torso.velocity.x) > 1.5f)
					{
						this.feetCycle += this.torso.velocity.x * this.feetCycleSpeed;
						this.feetJoints[0].connectedAnchor = this.origFeetAnchors[0] + new Vector2(Mathf.Sin(this.feetCycle) * this.sideFeetCycleMult * this.lookDir, Mathf.Sin(this.feetCycle + 90f) * this.upFeetCycleMult + this.feetYOffset);
						this.feetJoints[1].connectedAnchor = this.origFeetAnchors[1] + new Vector2(Mathf.Sin(this.feetCycle + this.feetCycleOffset) * this.sideFeetCycleMult * this.lookDir, Mathf.Sin(this.feetCycle + 90f + this.feetCycleOffset) * this.upFeetCycleMult + this.feetYOffset);
						this.feet[0].MoveRotation(Mathf.LerpAngle(this.feet[0].rotation, 0f, this.overallForce * Time.fixedDeltaTime * 5f));
						this.feet[1].MoveRotation(Mathf.LerpAngle(this.feet[1].rotation, 0f, this.overallForce * Time.fixedDeltaTime * 5f));
					}
					else
					{
						this.feetJoints[0].connectedAnchor = Vector2.Lerp(this.feetJoints[0].connectedAnchor, this.origFeetAnchors[0], 3f * Time.fixedDeltaTime);
						this.feetJoints[1].connectedAnchor = Vector2.Lerp(this.feetJoints[1].connectedAnchor, this.origFeetAnchors[1], 3f * Time.fixedDeltaTime);
					}
				}
				else
				{
					if (this.torso.velocity.y > 0f)
					{
						this.fallAngle = Mathf.Lerp(this.fallAngle, -this.torso.velocity.x * 2f, Time.fixedDeltaTime * 5.5f);
					}
					else
					{
						this.fallAngle = Mathf.Lerp(this.fallAngle, this.torso.velocity.x * 2f, Time.fixedDeltaTime * 5.5f);
					}
					this.torso.MoveRotation(Mathf.LerpAngle(this.torso.rotation, this.fallAngle, this.overallForce * Time.fixedDeltaTime * 0.7f));
					this.feetJoints[0].connectedAnchor = Vector2.Lerp(this.feetJoints[0].connectedAnchor, this.origFeetAnchors[0], 3f * Time.fixedDeltaTime);
					this.feetJoints[1].connectedAnchor = Vector2.Lerp(this.feetJoints[1].connectedAnchor, this.origFeetAnchors[1], 3f * Time.fixedDeltaTime);
				}
			}
			this.lookPointer.position = this.torso.transform.TransformPoint(this.lookPointerPos);
			Vector2 vector = this.lookingPos - this.head.position;
			float num = Mathf.Atan2(vector.x, -vector.y) * 57.29578f - 90f;
			if (this.isRight)
			{
				num = Mathf.Clamp(num, -80f, 80f);
				this.lookPointer.eulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(this.lookPointer.eulerAngles.z, num, 5f * Time.fixedDeltaTime));
				num = Mathf.Clamp(num, -45f, 45f);
				num *= 0.5f;
				if (this.fallTime < 0f)
				{
					this.head.MoveRotation(Mathf.LerpAngle(this.head.rotation, num, this.overallForce * Time.fixedDeltaTime));
				}
				else
				{
					this.head.MoveRotation(Mathf.LerpAngle(this.head.rotation, num, this.overallForce * Time.fixedDeltaTime * 0.2f));
				}
			}
			else
			{
				num += 180f;
				num = Mathf.Clamp(num, -80f, 80f);
				this.lookPointer.eulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(this.lookPointer.eulerAngles.z, num, 5f * Time.fixedDeltaTime));
				num = Mathf.Clamp(num, -45f, 45f);
				num *= 0.5f;
				if (this.fallTime < 0f)
				{
					this.head.MoveRotation(Mathf.LerpAngle(this.head.rotation, num, this.overallForce * Time.fixedDeltaTime));
				}
				else
				{
					this.head.MoveRotation(Mathf.LerpAngle(this.head.rotation, num, this.overallForce * Time.fixedDeltaTime * 0.2f));
				}
			}
			if (this.hitStun <= 0f)
			{
				if (!this.holdingMain)
				{
					Vector2 a;
					if (!this.isBlocking)
					{
						if (this.isAttacking)
						{
							if (this.backAttacking)
							{
								if (this.windupTime > 0f)
								{
									a = this.lookPointerRelativePos(this.attackTwoWindup1);
								}
								else
								{
									a = this.lookPointerRelativePos(this.attackTwoAttack1);
								}
							}
							else if (this.windupTime > 0f)
							{
								a = this.lookPointerRelativePos(this.attackOneWindup1);
							}
							else
							{
								a = this.lookPointerRelativePos(this.attackOneAttack1);
							}
						}
						else
						{
							a = this.lookPointer.transform.position + this.lookPointer.up * this.unarmedPos1.y + this.lookPointer.right * this.unarmedPos1.x * this.lookDir;
						}
					}
					else
					{
						a = this.lookPointer.transform.position + this.lookPointer.up * this.blockPos1.y + this.lookPointer.right * this.blockPos1.x * this.lookDir;
					}
					this.hands[0].AddForce((a - this.hands[0].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
					this.hands[0].MoveRotation(Mathf.LerpAngle(this.hands[0].rotation, num, this.overallForce * Time.fixedDeltaTime * 5f));
					if (!this.isAttacking)
					{
						this.hands[0].velocity *= 0.9f;
					}
					else
					{
						this.hands[0].velocity *= 0.95f;
					}
					if (!this.isBlocking)
					{
						if (this.isAttacking)
						{
							if (this.backAttacking)
							{
								if (this.windupTime > 0f)
								{
									a = this.lookPointerRelativePos(this.attackTwoWindup2);
								}
								else
								{
									a = this.lookPointerRelativePos(this.attackTwoAttack2);
								}
							}
							else if (this.windupTime > 0f)
							{
								a = this.lookPointerRelativePos(this.attackOneWindup2);
							}
							else
							{
								a = this.lookPointerRelativePos(this.attackOneAttack2);
							}
						}
						else
						{
							a = this.lookPointer.transform.position + this.lookPointer.up * this.unarmedPos2.y + this.lookPointer.right * this.unarmedPos2.x * this.lookDir;
						}
					}
					else
					{
						a = this.lookPointer.transform.position + this.lookPointer.up * this.blockPos2.y + this.lookPointer.right * this.blockPos2.x * this.lookDir;
					}
					if (this.health / this.maxHealth < 0.35f && !this.isAttacking)
					{
						if (this.lastDamagedLimb)
						{
							this.hands[1].AddForce((this.lastDamagedLimb.TransformPoint(this.lastDamagedLimbPos) - this.hands[1].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
						}
					}
					else
					{
						this.hands[1].AddForce((a - this.hands[1].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
					}
					this.hands[1].MoveRotation(Mathf.LerpAngle(this.hands[1].rotation, num, this.overallForce * Time.fixedDeltaTime * 5f));
					if (!this.isAttacking)
					{
						this.hands[1].velocity *= 0.9f;
					}
					else
					{
						this.hands[1].velocity *= 0.95f;
					}
				}
				else
				{
					Vector2 a2;
					if (!this.isBlocking)
					{
						if (this.isAttacking)
						{
							if (this.backAttacking)
							{
								if (this.windupTime > 0f)
								{
									a2 = this.lookPointerRelativePos(this.held.windupTwo1);
								}
								else
								{
									a2 = this.lookPointerRelativePos(this.held.attackTwo1);
								}
							}
							else if (this.windupTime > 0f)
							{
								a2 = this.lookPointerRelativePos(this.held.windupOne1);
							}
							else
							{
								a2 = this.lookPointerRelativePos(this.held.attackOne1);
							}
						}
						else
						{
							a2 = this.lookPointerRelativePos(this.held.idle1);
						}
					}
					else
					{
						a2 = this.lookPointerRelativePos(this.held.block1);
					}
					this.hands[0].AddForce((a2 - this.hands[0].transform.position) * this.overallForce * 6f, ForceMode2D.Force);
					float b;
					if (!this.isBlocking)
					{
						if (this.isAttacking)
						{
							if (this.backAttacking)
							{
								if (this.windupTime > 0f)
								{
									b = this.lookPointerRelativeRot(this.held.windupTwo1Rot, num);
								}
								else
								{
									b = this.lookPointerRelativeRot(this.held.attackTwo1Rot, num);
								}
							}
							else if (this.windupTime > 0f)
							{
								b = this.lookPointerRelativeRot(this.held.windupOne1Rot, num);
							}
							else
							{
								b = this.lookPointerRelativeRot(this.held.attackOne1Rot, num);
							}
						}
						else
						{
							b = this.lookPointerRelativeRot(this.held.idle1Rot, num);
						}
					}
					else
					{
						b = this.lookPointerRelativeRot(this.held.block1Rot, num);
					}
					this.hands[0].MoveRotation(Mathf.LerpAngle(this.hands[0].rotation, b, this.overallForce * Time.fixedDeltaTime * 1f));
					this.holdingMain.attachedRigidbody.MoveRotation(Mathf.LerpAngle(this.holdingMain.attachedRigidbody.rotation, b, this.overallForce * Time.fixedDeltaTime));
					if (!this.isAttacking)
					{
						this.hands[0].velocity *= 0.9f;
						this.holdingMain.attachedRigidbody.velocity *= 0.9f;
						this.hands[0].angularVelocity *= 0.6f;
						this.holdingMain.attachedRigidbody.angularVelocity *= 0.6f;
					}
					else
					{
						this.hands[0].velocity *= 0.95f;
						this.holdingMain.attachedRigidbody.velocity *= 0.95f;
						this.hands[0].angularVelocity *= 0.6f;
						this.holdingMain.attachedRigidbody.angularVelocity *= 0.6f;
					}
					if (this.held.dualWield)
					{
						Vector2 a3 = a2 + this.lookPointer.up * this.held.holdPoint2.y + this.lookPointer.right * this.held.holdPoint2.x;
						this.hands[1].AddForce((a3 - this.hands[1].transform.position) * this.overallForce * 5f, ForceMode2D.Force);
						this.hands[1].MoveRotation(Mathf.LerpAngle(this.hands[1].rotation, b, this.overallForce * Time.fixedDeltaTime * 5f));
					}
					else
					{
						if (!this.isBlocking)
						{
							if (this.isAttacking)
							{
								if (this.backAttacking)
								{
									if (this.windupTime > 0f)
									{
										a2 = this.lookPointerRelativePos(this.held.windupTwo2);
									}
									else
									{
										a2 = this.lookPointerRelativePos(this.held.attackTwo2);
									}
								}
								else if (this.windupTime > 0f)
								{
									a2 = this.lookPointerRelativePos(this.held.windupOne2);
								}
								else
								{
									a2 = this.lookPointerRelativePos(this.held.attackOne2);
								}
							}
							else
							{
								a2 = this.lookPointerRelativePos(this.held.idle2);
							}
						}
						else
						{
							a2 = this.lookPointerRelativePos(this.held.block2);
						}
						if (this.health / this.maxHealth < 0.35f && !this.isAttacking && this.lastDamagedLimb)
						{
							this.hands[1].AddForce((this.lastDamagedLimb.TransformPoint(this.lastDamagedLimbPos) - this.hands[1].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
						}
						else
						{
							this.hands[1].AddForce((a2 - this.hands[1].transform.position) * this.overallForce * 4f, ForceMode2D.Force);
						}
						this.hands[1].MoveRotation(Mathf.LerpAngle(this.hands[1].rotation, num, this.overallForce * Time.fixedDeltaTime * 5f));
						if (!this.isAttacking)
						{
							this.hands[1].velocity *= 0.9f;
							this.hands[1].angularVelocity *= 0.9f;
						}
						else
						{
							this.hands[1].velocity *= 0.95f;
							this.hands[1].angularVelocity *= 0.95f;
						}
					}
				}
			}
			else if (this.lastDamagedLimb)
			{
				this.hands[0].AddForce((this.lastDamagedLimb.TransformPoint(this.lastDamagedLimbPos) - this.hands[0].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
				this.hands[0].MoveRotation(Mathf.LerpAngle(this.hands[0].rotation, num, this.overallForce * Time.fixedDeltaTime * 5f));
				this.hands[0].velocity *= 0.9f;
				this.hands[0].angularVelocity *= 0.9f;
				if (!this.holdingMain)
				{
					this.hands[0].GetComponent<SpriteRenderer>().sprite = this.handSprites[2];
				}
				if (!this.holdingSecond)
				{
					this.hands[1].AddForce((this.lastDamagedLimb.TransformPoint(this.lastDamagedLimbPos) - this.hands[1].transform.position) * this.overallForce * 3f, ForceMode2D.Force);
					this.hands[1].MoveRotation(Mathf.LerpAngle(this.hands[1].rotation, num, this.overallForce * Time.fixedDeltaTime * 5f));
					this.hands[1].velocity *= 0.9f;
					this.hands[1].angularVelocity *= 0.9f;
					this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[3];
				}
			}
			if (this.lookingPos.x > this.torso.transform.position.x)
			{
				this.lookDir += Time.deltaTime * this.turnSpeed;
			}
			if (this.lookingPos.x < this.torso.transform.position.x)
			{
				this.lookDir -= Time.deltaTime * this.turnSpeed;
			}
			if (!this.isRight && this.lookDir > 0f)
			{
				foreach (Rigidbody2D rigidbody2D in this.limbs)
				{
					rigidbody2D.transform.localScale = new Vector3(1f, 1f, 1f);
				}
				this.torsoSprite.flipX = false;
				this.headSprite.flipX = false;
				this.torsoSprite.sprite = this.torsoSprites[1];
				SpriteMask component = this.torsoSprite.GetComponent<SpriteMask>();
				component.alphaCutoff = 0.2f;
				component.sprite = this.torsoSprite.sprite;
				this.lookPointer.localScale = new Vector3(1f, 1f, 1f);
				this.isRight = true;
				if (this.holdingMain)
				{
					this.holdingMain.transform.localScale = new Vector3(1f, 1f, 1f);
				}
			}
			if (this.isRight && this.lookDir < 0f)
			{
				foreach (Rigidbody2D rigidbody2D2 in this.limbs)
				{
					rigidbody2D2.transform.localScale = new Vector3(-1f, 1f, 1f);
				}
				this.torsoSprite.flipX = true;
				this.headSprite.flipX = true;
				this.torsoSprite.sprite = this.torsoSprites[0];
				SpriteMask component2 = this.torsoSprite.GetComponent<SpriteMask>();
				component2.alphaCutoff = 0.2f;
				component2.sprite = this.torsoSprite.sprite;
				this.lookPointer.localScale = new Vector3(-1f, 1f, 1f);
				this.isRight = false;
				if (this.holdingMain)
				{
					this.holdingMain.transform.localScale = new Vector3(-1f, 1f, 1f);
				}
			}
			if (this.lookDir > 0.6f)
			{
				this.headSprite.sprite = this.headSprites[5];
			}
			else if (this.lookDir > 0.2f)
			{
				this.headSprite.sprite = this.headSprites[4];
			}
			else if (this.lookDir > -0.2f)
			{
				this.headSprite.sprite = this.headSprites[3];
			}
			else if (this.lookDir > -0.6f)
			{
				this.headSprite.sprite = this.headSprites[2];
			}
			else
			{
				this.headSprite.sprite = this.headSprites[1];
			}
			if (this.hitStun <= 0f && this.fallTime < 0f && this.knockOutTime < 0f)
			{
				if (this.moveDir.x > 0f && this.torso.velocity.x < this.maxSpeed)
				{
					this.torso.AddForce(Vector2.right * this.moveDir.x * this.moveForce);
				}
				else if (this.moveDir.x < 0f && this.torso.velocity.x > -this.maxSpeed)
				{
					this.torso.AddForce(Vector2.right * this.moveDir.x * this.moveForce);
				}
				else if (this.moveDir.x == 0f)
				{
					this.torso.velocity = new Vector2(this.torso.velocity.x * 0.92f, this.torso.velocity.y);
				}
			}
			if (this.fallTime < 0f)
			{
				this.torso.velocity = new Vector2(this.torso.velocity.x * 0.93f, this.torso.velocity.y);
			}
			else
			{
				this.torso.velocity = new Vector2(this.torso.velocity.x * 0.95f, this.torso.velocity.y);
			}
		}
		else
		{
			this.feetJoints[0].connectedAnchor = Vector2.Lerp(this.feetJoints[0].connectedAnchor, this.origFeetAnchors[0], 3f * Time.fixedDeltaTime);
			this.feetJoints[1].connectedAnchor = Vector2.Lerp(this.feetJoints[1].connectedAnchor, this.origFeetAnchors[1], 3f * Time.fixedDeltaTime);
		}
		if (!this.decapitated)
		{
			if (Vector2.Distance(this.head.transform.TransformPoint(this.headJoint.anchor), this.torso.transform.TransformPoint(this.headJoint.connectedAnchor)) > 0.2f)
			{
				this.framesHeadSeperated++;
				if (this.framesHeadSeperated > 10)
				{
					this.framesHeadSeperated = 0;
					if (!this.headOff)
					{
						foreach (RaycastHit2D raycastHit2D in Physics2D.LinecastAll(this.head.transform.TransformPoint(this.headJoint.anchor), this.torso.transform.TransformPoint(this.headJoint.connectedAnchor)))
						{
							if (!raycastHit2D.collider.CompareTag("Grunt"))
							{
								base.StartCoroutine("TemporaryHeadColDisable");
								break;
							}
						}
					}
				}
			}
			else
			{
				this.framesHeadSeperated = 0;
			}
		}
		for (int j = 0; j < 2; j++)
		{
			if (Vector2.Distance(this.hands[j].transform.position, this.lookPointer.transform.position) > this.maxHandDistance)
			{
				this.handJoints[j].frequency = 2f;
			}
			else
			{
				this.handJoints[j].frequency = 1f;
			}
		}
		if (this.torso.angularVelocity > 500f)
		{
			this.torso.angularVelocity -= 300f;
		}
		if (this.torso.angularVelocity < -500f)
		{
			this.torso.angularVelocity += 300f;
		}
	}

	// Token: 0x06000015 RID: 21 RVA: 0x000054C4 File Offset: 0x000036C4
	private IEnumerator TemporaryHeadColDisable()
	{
		this.headOff = true;
		this.head.GetComponent<Collider2D>().enabled = false;
		this.head.GetComponent<SpriteRenderer>().color = new Color(1f, 1f, 1f, 0.65f);
		yield return new WaitForSeconds(1f);
		this.headOff = false;
		this.head.GetComponent<Collider2D>().enabled = true;
		this.head.GetComponent<SpriteRenderer>().color = new Color(1f, 1f, 1f, 1f);
		yield break;
	}

	// Token: 0x06000016 RID: 22 RVA: 0x000054D4 File Offset: 0x000036D4
	public void Attack()
	{
		if (this.hitStun <= 0f && this.knockOutTime < 0f && !this.isAttacking && this.alive)
		{
			if (!this.heldFirearm)
			{
				this.isAttacking = true;
				if (!this.holdingMain)
				{
					this.windupTime = this.unarmedAttackWindupTime;
				}
				else
				{
					this.windupTime = this.held.windupTime;
				}
				this.madeSwingNoise = false;
				Sound.Play(this.unarmedWindUpSounds[Random.Range(0, this.unarmedWindUpSounds.Count)], this.torso.position, false, true, 1f);
			}
			else
			{
				this.heldFirearm.Fire();
			}
			this.hands[0].GetComponent<SpriteRenderer>().sprite = this.handSprites[0];
			this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[1];
		}
	}

	// Token: 0x06000017 RID: 23 RVA: 0x000055DC File Offset: 0x000037DC
	public void StopAttack()
	{
		if (this.isAttacking)
		{
			this.isAttacking = false;
			this.backAttacking = !this.backAttacking;
			if (!this.holdingSecond && (this.health / this.maxHealth < 0.35f || this.holdingMain))
			{
				this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[3];
			}
		}
	}

	// Token: 0x06000018 RID: 24 RVA: 0x00005654 File Offset: 0x00003854
	public void Jump()
	{
		if (this.jumpCooldown < 0f && this.grounded && this.alive && this.hitStun <= 0f)
		{
			this.jumpCooldown = 0.5f;
			this.torso.AddForce(Vector2.up * this.jumpForce, ForceMode2D.Impulse);
			this.fallAngle = -this.torso.velocity.x * 2f;
			Sound.Play(this.bodySounds[Random.Range(0, this.bodySounds.Count)], this.torso.position, false, true, 1f);
		}
	}

	// Token: 0x06000019 RID: 25 RVA: 0x0000570B File Offset: 0x0000390B
	public void TryPerfectBlock()
	{
		if (this.timeBeforeCanPerfectBlock < 0f && this.hitStun <= 0.35f)
		{
			this.timeBeforeCanPerfectBlock = 0.55f;
			this.perfectBlockTime = 0.15f;
		}
	}

	// Token: 0x0600001A RID: 26 RVA: 0x00005740 File Offset: 0x00003940
	private void Update()
	{
		if (this.alive)
		{
			this.timeBeforeCanPerfectBlock -= Time.deltaTime;
			this.perfectBlockTime -= Time.deltaTime;
			this.dodgeTime -= Time.deltaTime;
			this.fallTime -= Time.deltaTime;
			this.knockOutTime -= Time.deltaTime;
			this.timeSinceLastAttacked += Time.deltaTime;
			if (this.fallTime < -0.01f)
			{
				this.fallTime = -0.01f;
			}
			if (this.knockOutTime < -0.01f)
			{
				this.knockOutTime = -0.01f;
			}
			if (this.knockOutTime > 0f)
			{
				this.DropWeapon();
				this.jumpCooldown = 0.1f;
			}
			if (this.fallTime > 0f)
			{
				this.jumpCooldown = 0.1f;
			}
			if (this.windupTime < 0f && !this.madeSwingNoise)
			{
				this.madeSwingNoise = true;
				Sound.Play(this.unarmedSwingSounds[Random.Range(0, this.unarmedSwingSounds.Count)], this.torso.position, false, true, 1f);
				if (this.voice)
				{
					this.voice.Attack();
				}
			}
			if (this.handCheckTime < 0f)
			{
				this.handCheckTime = 0.2f;
				bool flag = false;
				foreach (Rigidbody2D rigidbody2D in this.hands)
				{
					foreach (RaycastHit2D raycastHit2D in Physics2D.LinecastAll(this.lookPointer.position, rigidbody2D.transform.position, LayerMask.GetMask(new string[]
					{
						"Default",
						"Grunt"
					})))
					{
						if (!this.limbCols.Contains(raycastHit2D.collider) && (!this.holdingMain || raycastHit2D.transform != this.held.transform))
						{
							flag = true;
						}
					}
				}
				if (flag)
				{
					this.hands[0].gameObject.layer = 7;
					this.hands[1].gameObject.layer = 7;
					if (this.held)
					{
						this.held.gameObject.layer = 7;
					}
				}
				else
				{
					this.hands[0].gameObject.layer = 6;
					this.hands[1].gameObject.layer = 6;
					if (this.held)
					{
						this.held.gameObject.layer = 6;
					}
				}
			}
		}
		this.lookDir = Mathf.Clamp(this.lookDir, -1f, 1f);
		this.jumpCooldown -= Time.deltaTime;
		this.windupTime -= Time.deltaTime * this.attackTimeMult;
		this.hitStun -= Time.deltaTime;
		if (this.hitStun < 0f)
		{
			this.hitStun = 0f;
		}
		this.shoveCooldown -= Time.deltaTime;
		this.handCheckTime -= Time.deltaTime;
		if (this.isAttacking && this.windupTime < -2f)
		{
			this.StopAttack();
		}
		if (this.isAttacking)
		{
			this.timeSinceLastAttacked = 0f;
		}
		this.pickupCooldown -= Time.deltaTime;
		if (this.health < 0f)
		{
			this.overallForce -= Time.deltaTime * this.origOverallForce;
			this.moveForce -= Time.deltaTime * 200f;
			this.maxSpeed -= Time.deltaTime * 6f;
			if (this.overallForce < 0f)
			{
				this.Death();
			}
			this.dizzyIcon.color = new Color(0f, 0f, 0f, 0f);
			return;
		}
		if (this.knockOutTime <= 0f)
		{
			this.dizzyIcon.color = new Color(this.dizzyIconColor.r, this.dizzyIconColor.g, this.dizzyIconColor.b, this.hitStun * 0.5f);
		}
		else
		{
			this.dizzyIcon.color = new Color(this.dizzyIconColor.r, this.dizzyIconColor.g, this.dizzyIconColor.b, Mathf.PingPong(Time.time * 2f, 0.7f));
		}
		this.dizzyIcon.transform.position = this.head.transform.position + Vector3.up * this.dizzyIconYOffset;
		this.dizzyIcon.transform.eulerAngles = new Vector3(0f, 0f, this.dizzyIcon.transform.eulerAngles.z + Time.deltaTime * 170f);
	}

	// Token: 0x0600001B RID: 27 RVA: 0x00005C98 File Offset: 0x00003E98
	public void Damage(float dmg, float hitSt = 0f)
	{
		this.health -= dmg;
		this.hitStun += hitSt * this.hitStunMult;
		if (this.health < 0f)
		{
			this.DropWeapon();
			this.pickupCooldown = 9999f;
		}
		if (this.voice && dmg > 5f)
		{
			this.voice.Hit();
		}
		if (hitSt * this.hitStunMult > 1.2f)
		{
			this.knockOutTime += hitSt * this.hitStunMult * 0.8f;
		}
		if (this.hitStun > 0.8f && this.holdingMain)
		{
			this.DropWeapon();
			this.knockOutTime += 0.3f;
			Sound.Play(Resources.Load<AudioClip>("Sounds/disarm"), this.torso.transform.position, false, true, 1f);
		}
	}

	// Token: 0x0600001C RID: 28 RVA: 0x00005D90 File Offset: 0x00003F90
	public void Decapitate()
	{
		if (!this.decapitated)
		{
			this.decapitated = true;
			this.head.GetComponent<HingeJoint2D>().enabled = false;
			this.head.GetComponent<SpringJoint2D>().enabled = false;
			this.head.AddForce(new Vector2(Random.Range(-15f, 15f), Random.Range(0f, 15f)), ForceMode2D.Impulse);
			this.head.AddTorque(Random.Range(-15f, 15f), ForceMode2D.Impulse);
			this.head.angularDrag = 8f;
			this.torso.GetComponent<DamageReceiver>().DecapWound();
			this.health = -1f;
			this.Death();
			this.overallForce = 0f;
			Sound.Play(Resources.Load<AudioClip>("Sounds/Dissmember" + Random.Range(1, 6).ToString()), this.head.transform.position, false, true, 1f);
			if (this != GameManager.main.playerBody)
			{
				PauseManager.main.TryUnlockAchievement(12);
			}
		}
	}

	// Token: 0x0600001D RID: 29 RVA: 0x00005EB4 File Offset: 0x000040B4
	public void Death()
	{
		if (this.alive)
		{
			this.alive = false;
			this.StopAttack();
			this.DropWeapon();
			this.hands[0].GetComponent<SpriteRenderer>().sprite = this.handSprites[2];
			this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[3];
			this.hands[0].angularDrag = 10f;
			this.hands[1].angularDrag = 10f;
			foreach (Rigidbody2D rigidbody2D in this.limbs)
			{
				rigidbody2D.gravityScale *= 1.8f;
			}
			if (base.GetComponent<AI>() && BloodDamageUI.main)
			{
				BloodDamageUI.main.EnemyKilled();
			}
		}
	}

	// Token: 0x0600001E RID: 30 RVA: 0x00005FBC File Offset: 0x000041BC
	public void PickupSpecific(WeaponScript wep)
	{
		this.pickupCooldown = 1f;
		wep.held = true;
		this.holdingMain = wep.gameObject.AddComponent<HingeJoint2D>();
		this.holdingMain.autoConfigureConnectedAnchor = false;
		this.holdingMain.connectedBody = this.hands[0];
		this.holdingMain.connectedAnchor = Vector2.zero;
		this.holdingMain.anchor = wep.holdPoint1;
		JointAngleLimits2D limits = default(JointAngleLimits2D);
		limits.max = wep.transform.eulerAngles.z - this.hands[0].transform.eulerAngles.z;
		limits.min = limits.max;
		this.holdingMain.limits = limits;
		this.held = wep;
		wep.GetComponent<SpriteRenderer>().sortingOrder = this.hands[0].GetComponent<SpriteRenderer>().sortingOrder - 1;
		if (wep.dualWield)
		{
			this.holdingSecond = this.holdingMain.gameObject.AddComponent<HingeJoint2D>();
			this.holdingSecond.autoConfigureConnectedAnchor = false;
			this.holdingSecond.connectedBody = this.hands[1];
			this.hands[1].GetComponent<SpriteRenderer>().sortingOrder = wep.GetComponent<SpriteRenderer>().sortingOrder + 1;
			this.hands[1].transform.position = wep.transform.TransformPoint(wep.holdPoint2);
			this.holdingSecond.anchor = wep.holdPoint2;
			this.holdingSecond.connectedAnchor = Vector2.zero;
			limits = default(JointAngleLimits2D);
			limits.max = wep.transform.eulerAngles.z - this.hands[1].transform.eulerAngles.z;
			limits.min = limits.max;
			this.holdingSecond.limits = limits;
		}
		else
		{
			this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[3];
		}
		if (this.isRight)
		{
			wep.transform.localScale = new Vector3(1f, 1f, 1f);
		}
		else
		{
			wep.transform.localScale = new Vector3(-1f, 1f, 1f);
		}
		Collider2D component = wep.GetComponent<Collider2D>();
		foreach (Collider2D collider in this.limbCols)
		{
			Physics2D.IgnoreCollision(collider, component, true);
		}
		this.held.GetComponent<DamagingObject>().currentOwner = this;
		if (this.held.GetComponent<DamagingObject>().stabbedRb && this.limbs.Contains(this.held.GetComponent<DamagingObject>().stabbedRb))
		{
			this.held.GetComponent<DamagingObject>().Unstab();
		}
		this.heldFirearm = wep.GetComponent<FirearmScript>();
		if (this.heldFirearm && this == GameManager.main.playerBody)
		{
			PauseManager.main.TryUnlockAchievement(19);
		}
	}

	// Token: 0x0600001F RID: 31 RVA: 0x000062F8 File Offset: 0x000044F8
	public void Pickup(WeaponScript wp = null)
	{
		if (this.canPickup && !this.holdingMain && this.alive)
		{
			if (!wp)
			{
				Collider2D[] array = Physics2D.OverlapCircleAll(this.torso.transform.position, 3f);
				for (int i = 0; i < array.Length; i++)
				{
					WeaponScript weaponScript;
					if (array[i].TryGetComponent<WeaponScript>(out weaponScript) && !weaponScript.held && this.pickupCooldown <= 0f && weaponScript.pickupable)
					{
						this.PickupSpecific(weaponScript);
						return;
					}
				}
				return;
			}
			if (!wp.held && this.pickupCooldown <= 0f && wp.pickupable)
			{
				this.PickupSpecific(wp);
			}
		}
	}

	// Token: 0x06000020 RID: 32 RVA: 0x000063B8 File Offset: 0x000045B8
	public void Shove()
	{
		if (this.knockOutTime < 0f && !this.isAttacking && !this.isBlocking && this.hitStun <= 0f && this.alive && this.shoveCooldown < 0f)
		{
			this.shoveCooldown = 1.5f / this.attackTimeMult;
			RaycastHit2D[] array = Physics2D.RaycastAll(this.lookPointer.position, this.lookPointer.right * this.lookDir, 3f);
			int i = 0;
			while (i < array.Length)
			{
				RaycastHit2D raycastHit2D = array[i];
				if (raycastHit2D.rigidbody && !this.limbCols.Contains(raycastHit2D.collider) && !raycastHit2D.collider.GetComponent<DamagingObject>())
				{
					raycastHit2D.rigidbody.AddForce(this.lookPointer.right * this.lookDir * this.overallForce * 10f * this.shovePowerMult, ForceMode2D.Impulse);
					DamageReceiver damageReceiver;
					if (raycastHit2D.collider.TryGetComponent<DamageReceiver>(out damageReceiver))
					{
						damageReceiver.body.hitStun += 0.5f * this.shovePowerMult;
						break;
					}
					break;
				}
				else
				{
					i++;
				}
			}
			this.hands[0].AddForce(this.lookPointer.right * 7.5f * this.lookDir, ForceMode2D.Impulse);
			this.hands[1].AddForce(this.lookPointer.right * 7.5f * this.lookDir, ForceMode2D.Impulse);
			Sound.Play(this.unarmedSwingSounds[Random.Range(0, this.unarmedSwingSounds.Count)], this.torso.position, false, true, 1f);
		}
	}

	// Token: 0x06000021 RID: 33 RVA: 0x000065D0 File Offset: 0x000047D0
	public void Dodge()
	{
		if (this.dodgeTime < -0.5f && this.moveDir.x != 0f && this.knockOutTime <= 0f && this.hitStun <= 0f && this.alive && this.fallTime <= 0f)
		{
			this.torso.velocity = new Vector2(this.moveDir.x * this.maxSpeed * 3.7f, this.torso.velocity.y);
			this.torso.AddTorque(-this.moveDir.x * this.maxSpeed * 5f, ForceMode2D.Impulse);
			this.fallTime = 2f - this.maxSpeed * 0.14f;
			Sound.Play(this.unarmedSwingSounds[Random.Range(0, this.unarmedSwingSounds.Count)], this.torso.position, false, true, 1f);
			this.dodgeTime = 1f;
		}
	}

	// Token: 0x06000022 RID: 34 RVA: 0x000066F0 File Offset: 0x000048F0
	public IEnumerator UnignoreColTimed(Collider2D col)
	{
		while (col && col)
		{
			if (Vector2.Distance(col.transform.position, this.torso.transform.position) > 4f && (!this.holdingMain || this.held.GetComponent<Collider2D>() != col))
			{
				using (List<Collider2D>.Enumerator enumerator = this.limbCols.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						Collider2D collider = enumerator.Current;
						Physics2D.IgnoreCollision(collider, col, false);
					}
					break;
				}
			}
			yield return new WaitForSeconds(0.1f);
		}
		yield return null;
		yield break;
	}

	// Token: 0x06000023 RID: 35 RVA: 0x00006708 File Offset: 0x00004908
	public void ThrowWeapon()
	{
		if (this.knockOutTime <= 0f && this.holdingMain && this.alive)
		{
			Rigidbody2D attachedRigidbody = this.holdingMain.attachedRigidbody;
			this.DropWeapon();
			this.torso.AddForce(this.lookPointer.right * 25f * this.lookDir, ForceMode2D.Impulse);
			this.hands[0].AddForce(this.lookPointer.right * 8f * this.lookDir, ForceMode2D.Impulse);
			attachedRigidbody.AddForce((this.lookPointer.right * 26f * this.lookDir + Vector3.up * 6f) * attachedRigidbody.mass, ForceMode2D.Impulse);
			attachedRigidbody.AddTorque(-5f * this.lookDir * attachedRigidbody.mass, ForceMode2D.Impulse);
			Sound.Play(this.unarmedSwingSounds[Random.Range(0, this.unarmedSwingSounds.Count)], this.torso.position, false, true, 1f);
			if (this.isAttacking && this.windupTime < 0f)
			{
				Sound.Play(Resources.Load<AudioClip>("Sounds/strongThrow"), this.torso.position, false, true, 1f);
			}
		}
	}

	// Token: 0x06000024 RID: 36 RVA: 0x00006888 File Offset: 0x00004A88
	public void DropWeapon()
	{
		if (this.holdingMain && this.held)
		{
			this.pickupCooldown = 1f;
			Collider2D component = this.holdingMain.GetComponent<Collider2D>();
			base.StartCoroutine("UnignoreColTimed", component);
			Object.Destroy(this.holdingMain);
			if (this.holdingSecond)
			{
				Object.Destroy(this.holdingSecond);
			}
			this.hands[1].GetComponent<SpriteRenderer>().sortingOrder = -30;
			this.hands[1].GetComponent<SpriteRenderer>().sprite = this.handSprites[1];
			this.hands[0].GetComponent<SpriteRenderer>().sprite = this.handSprites[0];
			this.held.held = false;
			this.held.gameObject.layer = 6;
			this.held.GetComponent<DamagingObject>().currentOwner = null;
			this.heldFirearm = null;
			this.held = null;
		}
	}

	// Token: 0x06000025 RID: 37 RVA: 0x0000698C File Offset: 0x00004B8C
	public void DropBlood(float dmg, int type, Vector2 pos)
	{
		if ((type == 0 && dmg > 25f) || (type == 1 && dmg > 10f) || type == 2)
		{
			if (this.health <= 0f && !this.playedCrackSound)
			{
				this.playedCrackSound = true;
				if (type == 0)
				{
					Sound.Play(Resources.Load<AudioClip>("Sounds/boneBreak"), pos, false, true, 1f);
				}
				else if (type == 1)
				{
					Sound.Play(Resources.Load<AudioClip>("Sounds/fleshBreak"), pos, false, true, 1f);
				}
			}
			GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("BloodSplat"), pos, Quaternion.Euler(0f, 0f, Random.Range(0f, 360f)));
			if (type != 0)
			{
				if (type == 1)
				{
					gameObject.GetComponent<SpriteRenderer>().sprite = GameManager.main.bloodWallSharp[Random.Range(0, GameManager.main.bloodWallSharp.Count)];
				}
			}
			else
			{
				gameObject.GetComponent<SpriteRenderer>().sprite = GameManager.main.bloodWallBlunt[Random.Range(0, GameManager.main.bloodWallBlunt.Count)];
			}
			gameObject.transform.localScale = new Vector3(Random.Range(0.8f, 1.2f), Random.Range(0.8f, 1.2f));
			if (Random.Range(0f, 1f) > 0.5f)
			{
				gameObject.GetComponent<SpriteRenderer>().flipX = true;
			}
			if (Random.Range(0f, 1f) > 0.5f)
			{
				gameObject.GetComponent<SpriteRenderer>().flipY = true;
			}
			gameObject.GetComponent<SpriteRenderer>().color = this.bloodColor;
			foreach (RaycastHit2D raycastHit2D in Physics2D.RaycastAll(pos, Vector2.down, 8f))
			{
				if (!raycastHit2D.transform.GetComponent<Rigidbody2D>() || raycastHit2D.transform.GetComponent<Rigidbody2D>().isKinematic)
				{
					gameObject = (GameObject)Object.Instantiate(Resources.Load("BloodSplat"), raycastHit2D.point, Quaternion.identity);
					if (type != 0)
					{
						if (type == 1)
						{
							gameObject.GetComponent<SpriteRenderer>().sprite = GameManager.main.bloodGroundSharp[Random.Range(0, GameManager.main.bloodGroundSharp.Count)];
						}
					}
					else
					{
						gameObject.GetComponent<SpriteRenderer>().sprite = GameManager.main.bloodGroundBlunt[Random.Range(0, GameManager.main.bloodGroundBlunt.Count)];
					}
					gameObject.transform.localScale = new Vector3(Random.Range(0.7f, 1.3f), Random.Range(0.9f, 1.1f));
					if (Random.Range(0f, 1f) > 0.5f)
					{
						gameObject.GetComponent<SpriteRenderer>().flipX = true;
					}
					if (Random.Range(0f, 1f) > 0.5f)
					{
						gameObject.GetComponent<SpriteRenderer>().flipY = true;
					}
					gameObject.GetComponent<SpriteRenderer>().color = this.bloodColor;
					gameObject.transform.SetParent(raycastHit2D.transform);
					break;
				}
			}
			gameObject = Object.Instantiate<GameObject>(this.bloodSplatAnims[Random.Range(0, this.bloodSplatAnims.Length)], pos, Quaternion.identity);
			gameObject.GetComponent<SpriteRenderer>().color = this.bloodColor;
			if (Random.Range(0f, 1f) > 0.5f)
			{
				gameObject.GetComponent<SpriteRenderer>().flipX = true;
			}
			Object.Destroy(gameObject, 3f);
		}
	}

	// Token: 0x0400002E RID: 46
	public string actualName;

	// Token: 0x0400002F RID: 47
	public bool grounded;

	// Token: 0x04000030 RID: 48
	public Rigidbody2D torso;

	// Token: 0x04000031 RID: 49
	public Rigidbody2D head;

	// Token: 0x04000032 RID: 50
	private SpriteRenderer headSprite;

	// Token: 0x04000033 RID: 51
	private SpriteRenderer torsoSprite;

	// Token: 0x04000034 RID: 52
	public List<Rigidbody2D> hands;

	// Token: 0x04000035 RID: 53
	public List<Rigidbody2D> feet;

	// Token: 0x04000036 RID: 54
	public float groundCheckOffset;

	// Token: 0x04000037 RID: 55
	public float groundCheckSize;

	// Token: 0x04000038 RID: 56
	public List<Rigidbody2D> limbs = new List<Rigidbody2D>();

	// Token: 0x04000039 RID: 57
	[HideInInspector]
	public List<Collider2D> limbCols;

	// Token: 0x0400003A RID: 58
	public float overallForce;

	// Token: 0x0400003B RID: 59
	private float origOverallForce;

	// Token: 0x0400003C RID: 60
	private float currentForce;

	// Token: 0x0400003D RID: 61
	public Sprite[] headSprites;

	// Token: 0x0400003E RID: 62
	public Sprite[] torsoSprites;

	// Token: 0x0400003F RID: 63
	public Sprite[] handSprites;

	// Token: 0x04000040 RID: 64
	[HideInInspector]
	public bool hasGore;

	// Token: 0x04000041 RID: 65
	public float lookDir = 1f;

	// Token: 0x04000042 RID: 66
	private bool isRight = true;

	// Token: 0x04000043 RID: 67
	[HideInInspector]
	public bool isBlocking;

	// Token: 0x04000044 RID: 68
	[HideInInspector]
	public bool isAttacking;

	// Token: 0x04000045 RID: 69
	private float windupTime;

	// Token: 0x04000046 RID: 70
	public float normalAngle;

	// Token: 0x04000047 RID: 71
	public float blockAngle;

	// Token: 0x04000048 RID: 72
	public float fallAngle;

	// Token: 0x04000049 RID: 73
	public float unarmedWindupAngle;

	// Token: 0x0400004A RID: 74
	public float unarmedAttackAngle;

	// Token: 0x0400004B RID: 75
	public float unarmedAttackWindupTime;

	// Token: 0x0400004C RID: 76
	public float maxSpeed;

	// Token: 0x0400004D RID: 77
	public float moveForce;

	// Token: 0x0400004E RID: 78
	public float jumpForce;

	// Token: 0x0400004F RID: 79
	[HideInInspector]
	public HingeJoint2D holdingMain;

	// Token: 0x04000050 RID: 80
	private HingeJoint2D holdingSecond;

	// Token: 0x04000051 RID: 81
	[HideInInspector]
	public WeaponScript held;

	// Token: 0x04000052 RID: 82
	[HideInInspector]
	public Vector2 moveDir;

	// Token: 0x04000053 RID: 83
	public float health = 100f;

	// Token: 0x04000054 RID: 84
	public float maxHealth;

	// Token: 0x04000055 RID: 85
	[HideInInspector]
	public bool alive = true;

	// Token: 0x04000056 RID: 86
	[HideInInspector]
	public Vector2 lookingPos;

	// Token: 0x04000057 RID: 87
	public Transform lookPointer;

	// Token: 0x04000058 RID: 88
	public Vector2 unarmedPos1;

	// Token: 0x04000059 RID: 89
	public Vector2 unarmedPos2;

	// Token: 0x0400005A RID: 90
	public Vector2 blockPos1;

	// Token: 0x0400005B RID: 91
	public Vector2 blockPos2;

	// Token: 0x0400005C RID: 92
	public Vector2 attackOneWindup1;

	// Token: 0x0400005D RID: 93
	public Vector2 attackOneWindup2;

	// Token: 0x0400005E RID: 94
	public Vector2 attackOneAttack1;

	// Token: 0x0400005F RID: 95
	public Vector2 attackOneAttack2;

	// Token: 0x04000060 RID: 96
	public Vector2 attackTwoWindup1;

	// Token: 0x04000061 RID: 97
	public Vector2 attackTwoWindup2;

	// Token: 0x04000062 RID: 98
	public Vector2 attackTwoAttack1;

	// Token: 0x04000063 RID: 99
	public Vector2 attackTwoAttack2;

	// Token: 0x04000064 RID: 100
	public Vector2 lookPointerPos;

	// Token: 0x04000065 RID: 101
	[HideInInspector]
	public float jumpCooldown;

	// Token: 0x04000066 RID: 102
	private bool backAttacking;

	// Token: 0x04000067 RID: 103
	public List<AudioClip> bodySounds = new List<AudioClip>();

	// Token: 0x04000068 RID: 104
	public List<AudioClip> unarmedSwingSounds = new List<AudioClip>();

	// Token: 0x04000069 RID: 105
	public List<AudioClip> unarmedWindUpSounds;

	// Token: 0x0400006A RID: 106
	private bool madeSwingNoise;

	// Token: 0x0400006B RID: 107
	[HideInInspector]
	public float hitStun;

	// Token: 0x0400006C RID: 108
	public float turnSpeed = 2f;

	// Token: 0x0400006D RID: 109
	public string team;

	// Token: 0x0400006E RID: 110
	public float unarmedDesiredAttackTime;

	// Token: 0x0400006F RID: 111
	[HideInInspector]
	public float pickupCooldown;

	// Token: 0x04000070 RID: 112
	[HideInInspector]
	public Transform lastDamagedLimb;

	// Token: 0x04000071 RID: 113
	[HideInInspector]
	public Vector2 lastDamagedLimbPos;

	// Token: 0x04000072 RID: 114
	private List<SpringJoint2D> handJoints = new List<SpringJoint2D>();

	// Token: 0x04000073 RID: 115
	public Sprite[] bluntWounds;

	// Token: 0x04000074 RID: 116
	public Sprite[] cutWounds;

	// Token: 0x04000075 RID: 117
	public Sprite[] gunshotWounds;

	// Token: 0x04000076 RID: 118
	[HideInInspector]
	public bool playedCrackSound;

	// Token: 0x04000077 RID: 119
	public float attackTimeMult = 1f;

	// Token: 0x04000078 RID: 120
	[HideInInspector]
	public float shoveCooldown;

	// Token: 0x04000079 RID: 121
	private float handCheckTime;

	// Token: 0x0400007A RID: 122
	public float hitStunMult = 1f;

	// Token: 0x0400007B RID: 123
	[Tooltip("Makes the hands move further in animations. Make bigger on bigger enemies.")]
	public float animPositionMult;

	// Token: 0x0400007C RID: 124
	public bool canPickup;

	// Token: 0x0400007D RID: 125
	public Color bloodColor;

	// Token: 0x0400007E RID: 126
	[HideInInspector]
	public VoiceScript voice;

	// Token: 0x0400007F RID: 127
	public float fallTime;

	// Token: 0x04000080 RID: 128
	public float knockOutTime;

	// Token: 0x04000081 RID: 129
	public GameObject[] bloodSplatAnims;

	// Token: 0x04000082 RID: 130
	[HideInInspector]
	public bool decapitated;

	// Token: 0x04000083 RID: 131
	[HideInInspector]
	public float dodgeTime;

	// Token: 0x04000084 RID: 132
	private List<HingeJoint2D> feetJoints = new List<HingeJoint2D>();

	// Token: 0x04000085 RID: 133
	private List<Vector2> origFeetAnchors = new List<Vector2>();

	// Token: 0x04000086 RID: 134
	public float upFeetCycleMult;

	// Token: 0x04000087 RID: 135
	public float sideFeetCycleMult;

	// Token: 0x04000088 RID: 136
	public float feetCycleOffset;

	// Token: 0x04000089 RID: 137
	public float feetCycleSpeed;

	// Token: 0x0400008A RID: 138
	public float feetYOffset;

	// Token: 0x0400008B RID: 139
	private float feetCycle;

	// Token: 0x0400008C RID: 140
	public float shovePowerMult = 1f;

	// Token: 0x0400008D RID: 141
	public bool canBeZombified;

	// Token: 0x0400008E RID: 142
	private SpriteRenderer dizzyIcon;

	// Token: 0x0400008F RID: 143
	public Color dizzyIconColor;

	// Token: 0x04000090 RID: 144
	public float dizzyIconYOffset;

	// Token: 0x04000091 RID: 145
	[HideInInspector]
	public FirearmScript heldFirearm;

	// Token: 0x04000092 RID: 146
	private bool headOff;

	// Token: 0x04000093 RID: 147
	private int framesHeadSeperated;

	// Token: 0x04000094 RID: 148
	[HideInInspector]
	public HingeJoint2D headJoint;

	// Token: 0x04000095 RID: 149
	public float maxHandDistance;

	// Token: 0x04000096 RID: 150
	[HideInInspector]
	public float perfectBlockTime;

	// Token: 0x04000097 RID: 151
	[HideInInspector]
	public float timeBeforeCanPerfectBlock;

	// Token: 0x04000098 RID: 152
	public float timeSinceLastAttacked;

	// Token: 0x04000099 RID: 153
	public bool skinnable = true;

	// Token: 0x0400009A RID: 154
	[HideInInspector]
	public BodyScript lastEngagedEnemy;
}
